use crate::bsl::bsl_list::BslList;
use crate::bsl::bsl_obj::BslCid;
use crate::bsl::bsl_sal::BSL_TIME;
use crate::bsl::bsl_types::BSL_Buffer;
use crate::crypto::crypt_types::{CRYPT_EncodeParam, CRYPT_RSA_PssPara};
pub type HITLS_PKI_LibCtx = ::std::os::raw::c_void;
pub const HITLS_X509_VERSION_1: u32 = 0;
pub const HITLS_X509_VERSION_2: u32 = 1;
pub const HITLS_X509_VERSION_3: u32 = 2;
pub const HITLS_X509_EXT_KU_DIGITAL_SIGN: u32 = 128;
pub const HITLS_X509_EXT_KU_NON_REPUDIATION: u32 = 64;
pub const HITLS_X509_EXT_KU_KEY_ENCIPHERMENT: u32 = 32;
pub const HITLS_X509_EXT_KU_DATA_ENCIPHERMENT: u32 = 16;
pub const HITLS_X509_EXT_KU_KEY_AGREEMENT: u32 = 8;
pub const HITLS_X509_EXT_KU_KEY_CERT_SIGN: u32 = 4;
pub const HITLS_X509_EXT_KU_CRL_SIGN: u32 = 2;
pub const HITLS_X509_EXT_KU_ENCIPHER_ONLY: u32 = 1;
pub const HITLS_X509_EXT_KU_DECIPHER_ONLY: u32 = 32768;
pub const HITLS_X509_EXT_KU_NONE: u32 = 65535;
pub const HITLS_X509_REVOKED_REASON_UNSPECIFIED: u32 = 0;
pub const HITLS_X509_REVOKED_REASON_KEY_COMPROMISE: u32 = 1;
pub const HITLS_X509_REVOKED_REASON_CA_COMPROMISE: u32 = 2;
pub const HITLS_X509_REVOKED_REASON_AFFILIATION_CHANGED: u32 = 3;
pub const HITLS_X509_REVOKED_REASON_SUPERSEDED: u32 = 4;
pub const HITLS_X509_REVOKED_REASON_CESSATION_OF_OPERATION: u32 = 5;
pub const HITLS_X509_REVOKED_REASON_CERTIFICATE_HOLD: u32 = 6;
pub const HITLS_X509_REVOKED_REASON_REMOVE_FROM_CRL: u32 = 8;
pub const HITLS_X509_REVOKED_REASON_PRIVILEGE_WITHDRAWN: u32 = 9;
pub const HITLS_X509_REVOKED_REASON_AA_COMPROMISE: u32 = 10;
pub const HITLS_X509_FLAG_VFY_WITH_PARTIAL_WILDCARD: u32 = 1;
pub const HITLS_PKI_PRINT_DN_ONELINE: u32 = 0;
pub const HITLS_PKI_PRINT_DN_MULTILINE: u32 = 1;
pub const HITLS_PKI_PRINT_DN_RFC2253: u32 = 2;
pub const HITLS_X509_REF_UP: HITLS_X509_Cmd = 0;
pub const HITLS_X509_GET_ENCODELEN: HITLS_X509_Cmd = 256;
pub const HITLS_X509_GET_ENCODE: HITLS_X509_Cmd = 257;
pub const HITLS_X509_GET_PUBKEY: HITLS_X509_Cmd = 258;
pub const HITLS_X509_GET_SIGNALG: HITLS_X509_Cmd = 259;
pub const HITLS_X509_GET_SUBJECT_DN_STR: HITLS_X509_Cmd = 260;
pub const HITLS_X509_GET_ISSUER_DN_STR: HITLS_X509_Cmd = 261;
pub const HITLS_X509_GET_SERIALNUM_STR: HITLS_X509_Cmd = 262;
pub const HITLS_X509_GET_BEFORE_TIME_STR: HITLS_X509_Cmd = 263;
pub const HITLS_X509_GET_AFTER_TIME_STR: HITLS_X509_Cmd = 264;
pub const HITLS_X509_GET_SUBJECT_DN: HITLS_X509_Cmd = 265;
pub const HITLS_X509_GET_ISSUER_DN: HITLS_X509_Cmd = 266;
pub const HITLS_X509_GET_VERSION: HITLS_X509_Cmd = 267;
pub const HITLS_X509_GET_REVOKELIST: HITLS_X509_Cmd = 268;
pub const HITLS_X509_GET_SERIALNUM: HITLS_X509_Cmd = 269;
pub const HITLS_X509_GET_BEFORE_TIME: HITLS_X509_Cmd = 270;
pub const HITLS_X509_GET_AFTER_TIME: HITLS_X509_Cmd = 271;
pub const HITLS_X509_GET_SIGN_MDALG: HITLS_X509_Cmd = 272;
pub const HITLS_X509_GET_ENCODE_SUBJECT_DN: HITLS_X509_Cmd = 273;
pub const HITLS_X509_IS_SELF_SIGNED: HITLS_X509_Cmd = 274;
pub const HITLS_X509_GET_SUBJECT_CN_STR: HITLS_X509_Cmd = 275;
pub const HITLS_X509_SET_VERSION: HITLS_X509_Cmd = 512;
pub const HITLS_X509_SET_SERIALNUM: HITLS_X509_Cmd = 513;
pub const HITLS_X509_SET_BEFORE_TIME: HITLS_X509_Cmd = 514;
pub const HITLS_X509_SET_AFTER_TIME: HITLS_X509_Cmd = 515;
pub const HITLS_X509_SET_PUBKEY: HITLS_X509_Cmd = 516;
pub const HITLS_X509_SET_SUBJECT_DN: HITLS_X509_Cmd = 517;
pub const HITLS_X509_SET_ISSUER_DN: HITLS_X509_Cmd = 518;
pub const HITLS_X509_SET_CSR_EXT: HITLS_X509_Cmd = 519;
pub const HITLS_X509_ADD_SUBJECT_NAME: HITLS_X509_Cmd = 520;
pub const HITLS_X509_CRL_ADD_REVOKED_CERT: HITLS_X509_Cmd = 521;
pub const HITLS_X509_EXT_SET_SKI: HITLS_X509_Cmd = 1024;
pub const HITLS_X509_EXT_SET_AKI: HITLS_X509_Cmd = 1025;
pub const HITLS_X509_EXT_SET_KUSAGE: HITLS_X509_Cmd = 1026;
pub const HITLS_X509_EXT_SET_SAN: HITLS_X509_Cmd = 1027;
pub const HITLS_X509_EXT_SET_BCONS: HITLS_X509_Cmd = 1028;
pub const HITLS_X509_EXT_SET_EXKUSAGE: HITLS_X509_Cmd = 1029;
pub const HITLS_X509_EXT_SET_CRLNUMBER: HITLS_X509_Cmd = 1030;
pub const HITLS_X509_EXT_GET_SKI: HITLS_X509_Cmd = 1280;
pub const HITLS_X509_EXT_GET_CRLNUMBER: HITLS_X509_Cmd = 1281;
pub const HITLS_X509_EXT_GET_AKI: HITLS_X509_Cmd = 1282;
pub const HITLS_X509_EXT_GET_KUSAGE: HITLS_X509_Cmd = 1283;
pub const HITLS_X509_EXT_GET_BCONS: HITLS_X509_Cmd = 1284;
pub const HITLS_X509_EXT_GET_SAN: HITLS_X509_Cmd = 1285;
pub const HITLS_X509_EXT_CHECK_SKI: HITLS_X509_Cmd = 1536;
pub const HITLS_X509_CSR_GET_ATTRIBUTES: HITLS_X509_Cmd = 1792;
pub const HITLS_X509_SET_VFY_SM2_USER_ID: HITLS_X509_Cmd = 2048;
pub type HITLS_X509_Cmd = ::std::os::raw::c_uint;
pub const HITLS_X509_ATTR_SET_REQUESTED_EXTENSIONS: HITLS_X509_AttrCmd = 256;
pub const HITLS_X509_ATTR_GET_REQUESTED_EXTENSIONS: HITLS_X509_AttrCmd = 512;
pub type HITLS_X509_AttrCmd = ::std::os::raw::c_uint;
pub const HITLS_X509_GN_EMAIL: HITLS_X509_GeneralNameType = 0;
pub const HITLS_X509_GN_DNS: HITLS_X509_GeneralNameType = 1;
pub const HITLS_X509_GN_DNNAME: HITLS_X509_GeneralNameType = 2;
pub const HITLS_X509_GN_URI: HITLS_X509_GeneralNameType = 3;
pub const HITLS_X509_GN_IP: HITLS_X509_GeneralNameType = 4;
pub const HITLS_X509_GN_MAX: HITLS_X509_GeneralNameType = 5;
pub type HITLS_X509_GeneralNameType = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_DN {
    pub cid: BslCid,
    pub data: *mut u8,
    pub dataLen: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_DN"][::std::mem::size_of::<HITLS_X509_DN>() - 24usize];
    ["Alignment of HITLS_X509_DN"][::std::mem::align_of::<HITLS_X509_DN>() - 8usize];
    ["Offset of field: HITLS_X509_DN::cid"][::std::mem::offset_of!(HITLS_X509_DN, cid) - 0usize];
    ["Offset of field: HITLS_X509_DN::data"][::std::mem::offset_of!(HITLS_X509_DN, data) - 8usize];
    ["Offset of field: HITLS_X509_DN::dataLen"]
        [::std::mem::offset_of!(HITLS_X509_DN, dataLen) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_GeneralName {
    pub type_: HITLS_X509_GeneralNameType,
    pub value: BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_GeneralName"][::std::mem::size_of::<HITLS_X509_GeneralName>() - 24usize];
    ["Alignment of HITLS_X509_GeneralName"]
        [::std::mem::align_of::<HITLS_X509_GeneralName>() - 8usize];
    ["Offset of field: HITLS_X509_GeneralName::type_"]
        [::std::mem::offset_of!(HITLS_X509_GeneralName, type_) - 0usize];
    ["Offset of field: HITLS_X509_GeneralName::value"]
        [::std::mem::offset_of!(HITLS_X509_GeneralName, value) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtAki {
    pub critical: bool,
    pub kid: BSL_Buffer,
    pub issuerName: *mut BslList,
    pub serialNum: BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtAki"][::std::mem::size_of::<HITLS_X509_ExtAki>() - 48usize];
    ["Alignment of HITLS_X509_ExtAki"][::std::mem::align_of::<HITLS_X509_ExtAki>() - 8usize];
    ["Offset of field: HITLS_X509_ExtAki::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtAki, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtAki::kid"]
        [::std::mem::offset_of!(HITLS_X509_ExtAki, kid) - 8usize];
    ["Offset of field: HITLS_X509_ExtAki::issuerName"]
        [::std::mem::offset_of!(HITLS_X509_ExtAki, issuerName) - 24usize];
    ["Offset of field: HITLS_X509_ExtAki::serialNum"]
        [::std::mem::offset_of!(HITLS_X509_ExtAki, serialNum) - 32usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtSki {
    pub critical: bool,
    pub kid: BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtSki"][::std::mem::size_of::<HITLS_X509_ExtSki>() - 24usize];
    ["Alignment of HITLS_X509_ExtSki"][::std::mem::align_of::<HITLS_X509_ExtSki>() - 8usize];
    ["Offset of field: HITLS_X509_ExtSki::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtSki, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtSki::kid"]
        [::std::mem::offset_of!(HITLS_X509_ExtSki, kid) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtKeyUsage {
    pub critical: bool,
    pub keyUsage: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtKeyUsage"][::std::mem::size_of::<HITLS_X509_ExtKeyUsage>() - 8usize];
    ["Alignment of HITLS_X509_ExtKeyUsage"]
        [::std::mem::align_of::<HITLS_X509_ExtKeyUsage>() - 4usize];
    ["Offset of field: HITLS_X509_ExtKeyUsage::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtKeyUsage, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtKeyUsage::keyUsage"]
        [::std::mem::offset_of!(HITLS_X509_ExtKeyUsage, keyUsage) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtExKeyUsage {
    pub critical: bool,
    pub oidList: *mut BslList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtExKeyUsage"]
        [::std::mem::size_of::<HITLS_X509_ExtExKeyUsage>() - 16usize];
    ["Alignment of HITLS_X509_ExtExKeyUsage"]
        [::std::mem::align_of::<HITLS_X509_ExtExKeyUsage>() - 8usize];
    ["Offset of field: HITLS_X509_ExtExKeyUsage::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtExKeyUsage, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtExKeyUsage::oidList"]
        [::std::mem::offset_of!(HITLS_X509_ExtExKeyUsage, oidList) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtSan {
    pub critical: bool,
    pub names: *mut BslList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtSan"][::std::mem::size_of::<HITLS_X509_ExtSan>() - 16usize];
    ["Alignment of HITLS_X509_ExtSan"][::std::mem::align_of::<HITLS_X509_ExtSan>() - 8usize];
    ["Offset of field: HITLS_X509_ExtSan::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtSan, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtSan::names"]
        [::std::mem::offset_of!(HITLS_X509_ExtSan, names) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtBCons {
    pub critical: bool,
    pub isCa: bool,
    pub maxPathLen: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtBCons"][::std::mem::size_of::<HITLS_X509_ExtBCons>() - 8usize];
    ["Alignment of HITLS_X509_ExtBCons"][::std::mem::align_of::<HITLS_X509_ExtBCons>() - 4usize];
    ["Offset of field: HITLS_X509_ExtBCons::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtBCons, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtBCons::isCa"]
        [::std::mem::offset_of!(HITLS_X509_ExtBCons, isCa) - 1usize];
    ["Offset of field: HITLS_X509_ExtBCons::maxPathLen"]
        [::std::mem::offset_of!(HITLS_X509_ExtBCons, maxPathLen) - 4usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct HITLS_X509_SignAlgParam {
    pub algId: i32,
    pub __bindgen_anon_1: HITLS_X509_SignAlgParam__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union HITLS_X509_SignAlgParam__bindgen_ty_1 {
    pub rsaPss: CRYPT_RSA_PssPara,
    pub sm2UserId: BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_SignAlgParam__bindgen_ty_1"]
        [::std::mem::size_of::<HITLS_X509_SignAlgParam__bindgen_ty_1>() - 16usize];
    ["Alignment of HITLS_X509_SignAlgParam__bindgen_ty_1"]
        [::std::mem::align_of::<HITLS_X509_SignAlgParam__bindgen_ty_1>() - 8usize];
    ["Offset of field: HITLS_X509_SignAlgParam__bindgen_ty_1::rsaPss"]
        [::std::mem::offset_of!(HITLS_X509_SignAlgParam__bindgen_ty_1, rsaPss) - 0usize];
    ["Offset of field: HITLS_X509_SignAlgParam__bindgen_ty_1::sm2UserId"]
        [::std::mem::offset_of!(HITLS_X509_SignAlgParam__bindgen_ty_1, sm2UserId) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_SignAlgParam"][::std::mem::size_of::<HITLS_X509_SignAlgParam>() - 24usize];
    ["Alignment of HITLS_X509_SignAlgParam"]
        [::std::mem::align_of::<HITLS_X509_SignAlgParam>() - 8usize];
    ["Offset of field: HITLS_X509_SignAlgParam::algId"]
        [::std::mem::offset_of!(HITLS_X509_SignAlgParam, algId) - 0usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_ExtCrlNumber {
    pub critical: bool,
    pub crlNumber: BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_ExtCrlNumber"][::std::mem::size_of::<HITLS_X509_ExtCrlNumber>() - 24usize];
    ["Alignment of HITLS_X509_ExtCrlNumber"]
        [::std::mem::align_of::<HITLS_X509_ExtCrlNumber>() - 8usize];
    ["Offset of field: HITLS_X509_ExtCrlNumber::critical"]
        [::std::mem::offset_of!(HITLS_X509_ExtCrlNumber, critical) - 0usize];
    ["Offset of field: HITLS_X509_ExtCrlNumber::crlNumber"]
        [::std::mem::offset_of!(HITLS_X509_ExtCrlNumber, crlNumber) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_RevokeExtTime {
    pub critical: bool,
    pub time: BSL_TIME,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_RevokeExtTime"]
        [::std::mem::size_of::<HITLS_X509_RevokeExtTime>() - 14usize];
    ["Alignment of HITLS_X509_RevokeExtTime"]
        [::std::mem::align_of::<HITLS_X509_RevokeExtTime>() - 2usize];
    ["Offset of field: HITLS_X509_RevokeExtTime::critical"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtTime, critical) - 0usize];
    ["Offset of field: HITLS_X509_RevokeExtTime::time"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtTime, time) - 2usize];
};
pub const HITLS_X509_CRL_SET_REVOKED_SERIALNUM: HITLS_X509_RevokeCmd = 0;
pub const HITLS_X509_CRL_SET_REVOKED_REVOKE_TIME: HITLS_X509_RevokeCmd = 1;
pub const HITLS_X509_CRL_SET_REVOKED_INVALID_TIME: HITLS_X509_RevokeCmd = 2;
pub const HITLS_X509_CRL_SET_REVOKED_REASON: HITLS_X509_RevokeCmd = 3;
pub const HITLS_X509_CRL_SET_REVOKED_CERTISSUER: HITLS_X509_RevokeCmd = 4;
pub const HITLS_X509_CRL_GET_REVOKED_SERIALNUM: HITLS_X509_RevokeCmd = 256;
pub const HITLS_X509_CRL_GET_REVOKED_REVOKE_TIME: HITLS_X509_RevokeCmd = 257;
pub const HITLS_X509_CRL_GET_REVOKED_INVALID_TIME: HITLS_X509_RevokeCmd = 258;
pub const HITLS_X509_CRL_GET_REVOKED_REASON: HITLS_X509_RevokeCmd = 259;
pub const HITLS_X509_CRL_GET_REVOKED_CERTISSUER: HITLS_X509_RevokeCmd = 260;
pub type HITLS_X509_RevokeCmd = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_RevokeExtReason {
    pub critical: bool,
    pub reason: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_RevokeExtReason"]
        [::std::mem::size_of::<HITLS_X509_RevokeExtReason>() - 8usize];
    ["Alignment of HITLS_X509_RevokeExtReason"]
        [::std::mem::align_of::<HITLS_X509_RevokeExtReason>() - 4usize];
    ["Offset of field: HITLS_X509_RevokeExtReason::critical"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtReason, critical) - 0usize];
    ["Offset of field: HITLS_X509_RevokeExtReason::reason"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtReason, reason) - 4usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_X509_RevokeExtCertIssuer {
    pub critical: bool,
    pub issuerName: *mut BslList,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_X509_RevokeExtCertIssuer"]
        [::std::mem::size_of::<HITLS_X509_RevokeExtCertIssuer>() - 16usize];
    ["Alignment of HITLS_X509_RevokeExtCertIssuer"]
        [::std::mem::align_of::<HITLS_X509_RevokeExtCertIssuer>() - 8usize];
    ["Offset of field: HITLS_X509_RevokeExtCertIssuer::critical"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtCertIssuer, critical) - 0usize];
    ["Offset of field: HITLS_X509_RevokeExtCertIssuer::issuerName"]
        [::std::mem::offset_of!(HITLS_X509_RevokeExtCertIssuer, issuerName) - 8usize];
};
pub const HITLS_X509_EXT_TYPE_CSR: HITLS_X509_ExtType = 0;
pub type HITLS_X509_ExtType = ::std::os::raw::c_uint;
pub const HITLS_X509_VFY_FLAG_CRL_ALL: HITLS_X509_VFY_FLAGS = 1;
pub const HITLS_X509_VFY_FLAG_CRL_DEV: HITLS_X509_VFY_FLAGS = 2;
pub const HITLS_X509_VFY_FLAG_PARTIAL_CHAIN: HITLS_X509_VFY_FLAGS = 4;
pub type HITLS_X509_VFY_FLAGS = ::std::os::raw::c_uint;
pub const TLS_SERVER: HITLS_X509_VFY_PURPOSE = 1;
pub const TLS_CLIENT: HITLS_X509_VFY_PURPOSE = 2;
pub const EMAIL_SIGN: HITLS_X509_VFY_PURPOSE = 3;
pub const EMAIL_ENCRYPT: HITLS_X509_VFY_PURPOSE = 4;
pub const CODE_SIGN: HITLS_X509_VFY_PURPOSE = 5;
pub const OCSP_SIGN: HITLS_X509_VFY_PURPOSE = 6;
pub const TIMESTAMPING: HITLS_X509_VFY_PURPOSE = 7;
pub const ANY: HITLS_X509_VFY_PURPOSE = 8;
pub type HITLS_X509_VFY_PURPOSE = ::std::os::raw::c_uint;
pub const HITLS_X509_STORECTX_SET_PARAM_DEPTH: HITLS_X509_StoreCtxCmd = 0;
pub const HITLS_X509_STORECTX_SET_PARAM_FLAGS: HITLS_X509_StoreCtxCmd = 1;
pub const HITLS_X509_STORECTX_SET_TIME: HITLS_X509_StoreCtxCmd = 2;
pub const HITLS_X509_STORECTX_SET_SECBITS: HITLS_X509_StoreCtxCmd = 3;
pub const HITLS_X509_STORECTX_SET_PURPOSE: HITLS_X509_StoreCtxCmd = 4;
pub const HITLS_X509_STORECTX_CLR_PARAM_FLAGS: HITLS_X509_StoreCtxCmd = 5;
pub const HITLS_X509_STORECTX_DEEP_COPY_SET_CA: HITLS_X509_StoreCtxCmd = 6;
pub const HITLS_X509_STORECTX_SHALLOW_COPY_SET_CA: HITLS_X509_StoreCtxCmd = 7;
pub const HITLS_X509_STORECTX_SET_CRL: HITLS_X509_StoreCtxCmd = 8;
pub const HITLS_X509_STORECTX_SET_VFY_SM2_USERID: HITLS_X509_StoreCtxCmd = 9;
pub const HITLS_X509_STORECTX_SET_VERIFY_CB: HITLS_X509_StoreCtxCmd = 10;
pub const HITLS_X509_STORECTX_SET_USR_DATA: HITLS_X509_StoreCtxCmd = 11;
pub const HITLS_X509_STORECTX_ADD_CA_PATH: HITLS_X509_StoreCtxCmd = 12;
pub const HITLS_X509_STORECTX_CLEAR_CRL: HITLS_X509_StoreCtxCmd = 13;
pub const HITLS_X509_STORECTX_SET_DEFAULT_PATH: HITLS_X509_StoreCtxCmd = 14;
pub const HITLS_X509_STORECTX_REF_UP: HITLS_X509_StoreCtxCmd = 256;
pub const HITLS_X509_STORECTX_GET_PARAM_DEPTH: HITLS_X509_StoreCtxCmd = 257;
pub const HITLS_X509_STORECTX_GET_VERIFY_CB: HITLS_X509_StoreCtxCmd = 258;
pub const HITLS_X509_STORECTX_GET_USR_DATA: HITLS_X509_StoreCtxCmd = 259;
pub const HITLS_X509_STORECTX_GET_PARAM_FLAGS: HITLS_X509_StoreCtxCmd = 260;
pub const HITLS_X509_STORECTX_SET_ERROR: HITLS_X509_StoreCtxCmd = 512;
pub const HITLS_X509_STORECTX_GET_ERROR: HITLS_X509_StoreCtxCmd = 513;
pub const HITLS_X509_STORECTX_GET_CUR_CERT: HITLS_X509_StoreCtxCmd = 514;
pub const HITLS_X509_STORECTX_SET_CUR_DEPTH: HITLS_X509_StoreCtxCmd = 515;
pub const HITLS_X509_STORECTX_GET_CUR_DEPTH: HITLS_X509_StoreCtxCmd = 516;
pub const HITLS_X509_STORECTX_GET_CERT_CHAIN: HITLS_X509_StoreCtxCmd = 517;
pub const HITLS_X509_STORECTX_MAX: HITLS_X509_StoreCtxCmd = 518;
pub type HITLS_X509_StoreCtxCmd = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_PKCS12_PwdParam {
    pub macPwd: *mut BSL_Buffer,
    pub encPwd: *mut BSL_Buffer,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_PKCS12_PwdParam"][::std::mem::size_of::<HITLS_PKCS12_PwdParam>() - 16usize];
    ["Alignment of HITLS_PKCS12_PwdParam"]
        [::std::mem::align_of::<HITLS_PKCS12_PwdParam>() - 8usize];
    ["Offset of field: HITLS_PKCS12_PwdParam::macPwd"]
        [::std::mem::offset_of!(HITLS_PKCS12_PwdParam, macPwd) - 0usize];
    ["Offset of field: HITLS_PKCS12_PwdParam::encPwd"]
        [::std::mem::offset_of!(HITLS_PKCS12_PwdParam, encPwd) - 8usize];
};
pub const HITLS_PKI_SET_PRINT_FLAG: HITLS_PKI_PrintCmd = 0;
pub const HITLS_PKI_PRINT_DNNAME: HITLS_PKI_PrintCmd = 1;
pub const HITLS_PKI_PRINT_DNNAME_HASH: HITLS_PKI_PrintCmd = 2;
pub const HITLS_PKI_PRINT_CERT: HITLS_PKI_PrintCmd = 3;
pub const HITLS_PKI_PRINT_NEXTUPDATE: HITLS_PKI_PrintCmd = 4;
pub const HITLS_PKI_PRINT_CSR: HITLS_PKI_PrintCmd = 5;
pub const HITLS_PKI_PRINT_CRL: HITLS_PKI_PrintCmd = 6;
pub type HITLS_PKI_PrintCmd = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_PKCS12_KdfParam {
    pub saltLen: u32,
    pub itCnt: u32,
    pub macId: u32,
    pub pwd: *mut u8,
    pub pwdLen: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_PKCS12_KdfParam"][::std::mem::size_of::<HITLS_PKCS12_KdfParam>() - 32usize];
    ["Alignment of HITLS_PKCS12_KdfParam"]
        [::std::mem::align_of::<HITLS_PKCS12_KdfParam>() - 8usize];
    ["Offset of field: HITLS_PKCS12_KdfParam::saltLen"]
        [::std::mem::offset_of!(HITLS_PKCS12_KdfParam, saltLen) - 0usize];
    ["Offset of field: HITLS_PKCS12_KdfParam::itCnt"]
        [::std::mem::offset_of!(HITLS_PKCS12_KdfParam, itCnt) - 4usize];
    ["Offset of field: HITLS_PKCS12_KdfParam::macId"]
        [::std::mem::offset_of!(HITLS_PKCS12_KdfParam, macId) - 8usize];
    ["Offset of field: HITLS_PKCS12_KdfParam::pwd"]
        [::std::mem::offset_of!(HITLS_PKCS12_KdfParam, pwd) - 16usize];
    ["Offset of field: HITLS_PKCS12_KdfParam::pwdLen"]
        [::std::mem::offset_of!(HITLS_PKCS12_KdfParam, pwdLen) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_PKCS12_MacParam {
    pub para: *mut ::std::os::raw::c_void,
    pub algId: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_PKCS12_MacParam"][::std::mem::size_of::<HITLS_PKCS12_MacParam>() - 16usize];
    ["Alignment of HITLS_PKCS12_MacParam"]
        [::std::mem::align_of::<HITLS_PKCS12_MacParam>() - 8usize];
    ["Offset of field: HITLS_PKCS12_MacParam::para"]
        [::std::mem::offset_of!(HITLS_PKCS12_MacParam, para) - 0usize];
    ["Offset of field: HITLS_PKCS12_MacParam::algId"]
        [::std::mem::offset_of!(HITLS_PKCS12_MacParam, algId) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct HITLS_PKCS12_EncodeParam {
    pub encParam: CRYPT_EncodeParam,
    pub macParam: HITLS_PKCS12_MacParam,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of HITLS_PKCS12_EncodeParam"]
        [::std::mem::size_of::<HITLS_PKCS12_EncodeParam>() - 32usize];
    ["Alignment of HITLS_PKCS12_EncodeParam"]
        [::std::mem::align_of::<HITLS_PKCS12_EncodeParam>() - 8usize];
    ["Offset of field: HITLS_PKCS12_EncodeParam::encParam"]
        [::std::mem::offset_of!(HITLS_PKCS12_EncodeParam, encParam) - 0usize];
    ["Offset of field: HITLS_PKCS12_EncodeParam::macParam"]
        [::std::mem::offset_of!(HITLS_PKCS12_EncodeParam, macParam) - 16usize];
};
pub const HITLS_PKCS12_GEN_LOCALKEYID: HITLS_PKCS12_Cmd = 1;
pub const HITLS_PKCS12_SET_ENTITY_KEYBAG: HITLS_PKCS12_Cmd = 2;
pub const HITLS_PKCS12_SET_ENTITY_CERTBAG: HITLS_PKCS12_Cmd = 3;
pub const HITLS_PKCS12_ADD_CERTBAG: HITLS_PKCS12_Cmd = 4;
pub const HITLS_PKCS12_GET_ENTITY_CERT: HITLS_PKCS12_Cmd = 5;
pub const HITLS_PKCS12_GET_ENTITY_KEY: HITLS_PKCS12_Cmd = 6;
pub const HITLS_PKCS12_GET_SECRETBAGS: HITLS_PKCS12_Cmd = 7;
pub const HITLS_PKCS12_ADD_SECRETBAG: HITLS_PKCS12_Cmd = 8;
pub const HITLS_PKCS12_GET_ENTITY_CERTBAG: HITLS_PKCS12_Cmd = 9;
pub const HITLS_PKCS12_GET_ENTITY_KEYBAG: HITLS_PKCS12_Cmd = 10;
pub const HITLS_PKCS12_ADD_KEYBAG: HITLS_PKCS12_Cmd = 11;
pub const HITLS_PKCS12_GET_KEYBAGS: HITLS_PKCS12_Cmd = 12;
pub const HITLS_PKCS12_GET_CERTBAGS: HITLS_PKCS12_Cmd = 13;
pub type HITLS_PKCS12_Cmd = ::std::os::raw::c_uint;
pub const HITLS_PKCS12_BAG_ADD_ATTR: HITLS_PKCS12_BagCmd = 0;
pub const HITLS_PKCS12_BAG_GET_ATTR: HITLS_PKCS12_BagCmd = 1;
pub const HITLS_PKCS12_BAG_GET_VALUE: HITLS_PKCS12_BagCmd = 2;
pub const HITLS_PKCS12_BAG_GET_ID: HITLS_PKCS12_BagCmd = 3;
pub const HITLS_PKCS12_BAG_GET_TYPE: HITLS_PKCS12_BagCmd = 4;
pub type HITLS_PKCS12_BagCmd = ::std::os::raw::c_uint;
